package com.gl.marina;

import java.util.*;
public class ListForTest implements MethodsForList {
    @Override
    public void insertByIndex(int index,String value,List list)throws IndexOutOfBoundsException{
        list.add(index, value);
    }
    @Override
    public String removeByIndex(int index, List list)  throws IndexOutOfBoundsException{
        return (String) list.remove(index);
    }
    @Override
    public boolean isExist(String element,List list){
        return list.contains(element);
    }
    @Override
    public boolean IteratorArrayList(List list)throws NoSuchElementException{
        Iterator it = list.iterator();
        while(it.hasNext()){
            String element= (String) it.next();
      }
        return true;
    }
    @Override
    public void removingAll(List list){
       list.clear();
    }
}